<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Test</title>  
  </head>
  <body>
    <script ka:src="local.js" ka:scope="local"></script>
    <script ka:src="global.js"></script>
    <div th:each="item: ['one', 'two']">  
      <script ka:scope="local">
        _.childVar = 'js_' + item;
      </script>       
      <div th:id="'before_' + item"><span th:text="childVar"></span></div>
      <div th:replace="called1.html"></div>
      <div th:id="'after_' + item"><span th:text="childVar"></span></div>
    </div>
  </body>
</html>


